package com.fullertontech.framework.global;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.test.context.TestExecutionListener;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
import org.springframework.test.context.transaction.TransactionalTestExecutionListener;

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@SpringBootTest
@ConditionalOnClass(value=TestExecutionListener.class)
@TestExecutionListeners(listeners= {GlobalUtils.class,DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class })
public @interface EnableTest {
	WebEnvironment webEnvironment() default SpringBootTest.WebEnvironment.RANDOM_PORT;
	Class<?> classes();
}
